﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using AutoMapper;
using YJTTool.DBBaseServer.Entities;
using YJTTool.MainWindow.Model;

namespace YJTTool.MainWindow.Profiles
{
    public class MappingProfile : Profile
    {
        public MappingProfile()
        {
            CreateMap<UserConfigDto, userconfig>()
             .ForMember(dest => dest.Id, opt => opt.MapFrom(src => src.Id))
             .ForMember(dest => dest.Date, opt => opt.MapFrom(src => src.Date))
             .ForMember(dest => dest.ModuleName, opt => opt.MapFrom(src => src.ModuleName))
             .ForMember(dest => dest.ModuleCode, opt => opt.MapFrom(src => src.ModuleCode))
             .ForMember(dest => dest.IsOpen, opt => opt.MapFrom(src => src.IsOpen))
             .ForMember(dest => dest.UserInfo, opt => opt.MapFrom(src => src.UserInfo));
        }
    }
}
